<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page import="com.ddstation.common.property.JsVersionProperties" %>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <title>详情</title>

        <style type="text/css">@import url("<c:url value="/css/weui.min.css"/>");</style>
        <style type="text/css">@import url("<c:url value="/css/jquery-weui.css"/>");</style>
        <style type="text/css">@import url("<c:url value="/css/mobile/lib/weknow-mobile.css?${JsVersionProperties.prop.getProperty('common')}"/>");</style>
        
        <script src="<c:url value="/js/lib/jquery.min.js"/>" type="text/javascript"></script>
        <script src="<c:url value="/js/jquery-weui.js"/>" type="text/javascript"></script>
    </head>

    <body>
		<!-- Preloader -->
		<div class="animationload">
			<div class="loader">
				Loading...
			</div>
		</div>
		<!-- End Preloader -->
		<!-- 遮罩 -->
		<div class="maskDiv" hidden></div>
		<!-- 悬浮窗 -->
		<div class="evaluateDiv">
			评 价
		</div>
       	<div class="weui_cells" style="margin: 0px;">
			<div class="weui_cell" style="background-color: #5677FC;" id="tableTitle">
				<div style="color: #ffffff;"><</div>
				<div class="titleName">${institutionEntity.name}</div>
			</div>
       		<div style="padding:1px;display: flex; -webkit-box-align: center;">
				<div style="background-color: #EEEEEE;font-size: 12px;" id="tableMenu">
					<div class="tableMenu" data-index="1">基本信息</div>
					<div class="tableMenu" data-index="2">医护信息</div>
					<div class="tableMenu" data-index="3">行政处罚</div>
					<div class="tableMenu" data-index="4">卫生消毒</div>
				</div>
				<div id="tableInfoBody" style="overflow-y:auto;padding-bottom: 20px;margin: auto;">
					<%--基本信息--%>
					<div id="institutionInfo" style="padding-left: 10px;padding-right: 10px;" hidden>
						<div style="height: 46px;line-height: 46px;">医疗机构信用等级:<span style="color: #3cc51f;font-width: 500;">无</span></div>
						<div>
							<table class="tableCss" cellspacing="0" cellpadding="0">
								<tr>
									<td style="width: 30%;">机构名称</td>
									<td>${institutionEntity.name}</td>
								</tr>
								<tr>
									<td>机构地址</td>
									<td>${institutionEntity.address}</td>
								</tr>
								<tr>
									<td>诊疗科目</td>
									<td> - </td>
								</tr>
								<tr>
									<td>法人代表</td>
									<td>${institutionEntity.ownerName}</td>
								</tr>
								<tr>
									<td>许可证编号</td>
									<td>${institutionEntity.occupationalLicenceCd}</td>
								</tr>
								<tr>
									<td>许可证有效期</td>
									<td><fmt:formatDate pattern="yyyy-MM-dd" value="${institutionEntity.occupationalLicenceEndDate}" type="both"/></td>
								</tr>
								<tr>
									<td>发证机关</td>
									<td> - </td>
								</tr>
							</table>
						</div>
					</div>
					<%--医护信息--%>
					<div id="doctorInfo" hidden>
						<!-- 遮罩 -->
						<div class="doctorPopup" hidden>
							<div class="doctorPopupTitleDiv">
								<span style="float: left;padding-left: 20px;">医生信息</span>
								<span class="closeDoctorPopup">X</span>
								<div style="clear:both;"></div>
							</div>
							<div class="doctorPopupDiv">
								<div style="font-weight: 700;">
									<span id="popupDoctorName"></span>
									<span id="popupDoctorGender" style="margin-left: 20px;"></span>
								</div>
								<div id="popupDoctorInfoDiv"></div>
							</div>
						</div>
						<!-- 医生 -->
						<div id="doctorTitleDiv" class="doctorTitleDiv">
							<span style="float: left;padding-left: 20px;">医生信息（${doctorCount}个）</span>
							<span style="float: right;padding-right: 20px;" id="doctorTitleDivIcon">▲</span>
							<div style="clear:both;"></div>
						</div>
						<div id="doctorListDiv" style="padding-left: 25px;padding-right: 10px;">
							<c:forEach var="a" items="${doctorList}" varStatus="xh">
								<div class="doctorDiv" style="border-bottom: 2px solid #DDDDDD;"
									 data-doctor_name="${a.name}"
									 data-doctor_gender="${a.gender}"
									 data-doctor_type="${a.technicalTitle}"
									 data-doctor_range="${a.scopePractice}"
<%--									 data-doctor_level="???"--%>
									 data-doctor_address="${a.address}">
									<div class="doctorInfoTitleDiv">
										<span>${a.name}</span>
										<span style="margin-left: 20px;">${a.gender} </span>
										<span style="margin-left: 20px;">${a.technicalTitle}</span>
									</div>
									<div>
										<div class="doctorRowDiv">
											<span>执业范围:</span>
											<span><c:if test="${a.scopePractice eq null}">无</c:if>${a.scopePractice}</span>
										</div>
										<div class="doctorRowDiv">
											<span>执业地点:</span>
											<span>${a.address}</span>
										</div>
									</div>
								</div>
							</c:forEach>
							<div style="clear:both;"></div>
						</div>
						<!-- 护士 -->
						<div id="nurseTitleDiv" class="doctorTitleDiv">
							<span style="float: left;padding-left: 20px;">护士信息（${nurseCount}个）</span>
							<span style="float: right;padding-right: 20px;" id="nurseTitleDivIcon">▲</span>
							<div style="clear:both;"></div>
						</div>
						<div id="nurseListDiv" style="padding-left: 25px;padding-right: 10px;">
							<c:forEach var="a" items="${nurseList}" varStatus="xh">
								<div class="doctorDiv" style="border-bottom: 2px solid #DDDDDD;"
									 data-doctor_name="${a.name}"
									 data-doctor_gender="${a.gender}"
									 data-doctor_type="${a.technicalTitle}"
									 data-doctor_address="${a.address}">
									<div class="doctorInfoTitleDiv">
										<span>${a.name}</span>
										<span style="margin-left: 20px;">${a.gender} </span>
										<span style="margin-left: 20px;">${a.technicalTitle}</span>
									</div>
									<div>
										<div class="doctorRowDiv">
											<span>执业地点:</span>
											<span>${a.address}</span>
										</div>
									</div>
								</div>
							</c:forEach>
							<div style="clear:both;"></div>
						</div>
					</div>
					<%--处罚违规--%>
					<div id="sanctionInfo" hidden>
						<div class="noInfo">暂无处罚信息</div>
					</div>
					<%--卫生消毒--%>
					<div id="disinfectionInfo" hidden>
						<!-- 器械 -->
						<div id="apparatusTitleDiv" class="doctorTitleDiv">
							<span style="float: left;padding-left: 20px;">器械消毒（${apparatusCount}个）</span>
							<span style="float: right;padding-right: 20px;" id="apparatusTitleDivIcon">▲</span>
							<div style="clear:both;"></div>
						</div>
						<div id="apparatusListDiv" style="padding-left: 25px;padding-right: 10px;">
							<c:forEach var="a" items="${apparatusList}" varStatus="xh">
								<div class="disinfectionDiv" style="border-bottom: 2px solid #DDDDDD;">
									<div>
										<div class="doctorRowDiv">
											<span>消毒时间:</span>
											<span>${a.serialDate}</span>
										</div>
										<div class="doctorRowDiv">
											<span>消毒方法:</span>
											<span>${a.disinfectTypeTxt}</span>
										</div>
										<div class="doctorRowDiv">
											<span>消毒器械:</span>
											<span>
												<c:forEach var="b" items="${a.headEntity.detailList}" varStatus="xh">
													${b.instrumentName}(${b.quantity})
													<c:if test="${!xh.last}">、</c:if>
												</c:forEach>
											</span>
										</div>
									</div>
								</div>
							</c:forEach>
							<div style="clear:both;"></div>
						</div>
						<!-- 场所 -->
						<div id="placeTitleDiv" class="doctorTitleDiv">
							<span style="float: left;padding-left: 20px;">场所消毒（${placeCount}个）</span>
							<span style="float: right;padding-right: 20px;" id="placeTitleDivIcon">▲</span>
							<div style="clear:both;"></div>
						</div>
						<div id="placeListDiv" style="padding-left: 25px;padding-right: 10px;">
							<c:forEach var="a" items="${placeList}" varStatus="xh">
								<div class="disinfectionDiv" style="border-bottom: 2px solid #DDDDDD;">
									<div>
										<div class="doctorRowDiv">
											<span>消毒时间:</span>
											<span>${a.serialDate}</span>
										</div>
										<div class="doctorRowDiv">
											<span>消毒方法:</span>
											<span>${a.disinfectTypeTxt}</span>
										</div>
										<div class="doctorRowDiv">
											<span>消毒地点:</span>
											<span>
												<c:forEach var="b" items="${a.headEntity.detailList}" varStatus="xh">
													${b.instrumentName}
													<c:if test="${!xh.last}">、</c:if>
												</c:forEach>
											</span>
										</div>
									</div>
								</div>
							</c:forEach>
							<div style="clear:both;"></div>
						</div>

					</div>
					<!-- 评价 -->
					<div class="evaluatePopup" hidden>
						<div class="weui_cell" style="background-color: #5677FC;">
							<div class="closeEvaluatePopup"><</div>
							<div class="titleName">${institutionEntity.name}</div>
						</div>
						<div class="popupEvaluateInfo">
							<table class="evaluateTable" cellspacing="0" cellpadding="0">
								<tr>
									<td style="width: 20% ;"><span style="color: red;">*</span>满意度:</td>
									<td>
										<div class="evaluateImgDiv">
											<img src="img/satisfiedLevel-1.png" class="evaluateImg">
											<div>
												<input type="radio" name="evaluateLevel" value="0" checked>非常满意
											</div>
										</div>
										<div class="evaluateImgDiv">
											<img src="img/satisfiedLevel-2.png" class="evaluateImg">
											<div>
												<input type="radio" name="evaluateLevel" value="1">一般
											</div>
										</div>
										<div class="evaluateImgDiv">
											<img src="img/satisfiedLevel-3.png" class="evaluateImg">
											<div>
												<input type="radio" name="evaluateLevel" value="2">不满意
											</div>
										</div>
										<div style="clear:both;"></div>
									</td>
								</tr>
								<tr>
									<td>联系人:</td>
									<td>
										<input type="text" id="contactUser" class="evaluateInput" maxlength="20">
									</td>
								</tr>
								<tr>
									<td>联系方式:</td>
									<td>
										<input type="text" id="contactCell" class="evaluateInput" maxlength="11" oninput = "value=value.replace(/[^\d]/g,'')">
									</td>
								</tr>
								<tr>
									<td>您的建议:</td>
									<td>
										<input type="text" id="proposalContent" class="evaluateInput" maxlength="200">
									</td>
								</tr>
							</table>
							<div class="submitDiv">提 交</div>
							<div class="complaint">举报投诉请拨打：12345</div>
						</div>
					</div>
				</div>
	        </div>
		</div>
	    <input type="hidden" id="institutionId" value="${institutionEntity.id}">
		<input type="hidden" id="institutionName" value="${institutionEntity.name}">

		<link rel="stylesheet" href="<c:url value="/css/mobile/evaluate/evaluate.css?V1.0.0"/>">
	    <script src="<c:url value="/js/weui_swiper.js"/>" type="text/javascript"></script>
        <script src="<c:url value="/js/mobile/lib/weknow-mobile.js?${JsVersionProperties.prop.getProperty('common')}"/>" type="text/javascript"></script>
        <script src="<c:url value="/js/mobile/evaluate/evaluate.js?V1.0.1"/>" type="text/javascript"></script>

	</body>
</html>